
	<template>
    		<el-select  placeholder="邓剑雄" class="header2" value="" @change="open2">
    <el-option
	 class="header2-next"
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
  </el-select>
  
  </template>
  
  <script>
  export default {
     data() {
      return {
        options: [{
          value: '选项1',
          label: '切换用户'
        },{
          value: '选项2',
          label: '更换密码'
        }],
        value: ''
      }
    },
    methods: {
      open2:function(value) {
        if(value=='选项1'){
          this.$confirm('是否切换用户 ?', '提示', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning'
        }).then(() => {
          // this.$message({
          //   type: 'success',
          //   message: '删除成功!'
          // });
          this.$router.push({ path:'/login'})
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消'
          });          
        });
        }else{
          if(value=='选项2'){
             this.$confirm('是否更换密码 ?', '提示', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning'
        }).then(() => {
          // this.$message({
          //   type: 'success',
          //   message: '删除成功!'
          // });
         this.$router.push({ path:'/login'})
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });          
        });
          }
        }
        
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>

 .header2{
    width: 92px;
    height: 100%;
  
    // border: 1px solid;
}
.header2-next{
        width:131px;
        margin-left: 31px;
        color: black;
        background: #8a888b;
        margin-bottom: 5px;
        border-radius: 5%;
        border-radius: 5%;
        margin-top: 16px;
       height: 30px;
       color: white;
       }
      .header2-next:hover{
        background: #fefefe;
        color: #7d7b7a;
      }


.header2 /deep/ .el-input{
  width:92px;
  font-size: 15px;
  height: 100%;
}
</style>

<style lang="scss">


</style>

  
  